package com.itheima.d4;

import java.util.Random;

public class Utils {
    private Utils() {
    }

    public static String createCode(int n){
        String code = "";
        Random r = new Random();
        String all = "QWERTYUIOPASDFGHJKLMNBVCXZqwertyuioplkjhgfdsazxcvbnm1234567890";
        for (int i = 0; i < n ; i++) {
            int index = r.nextInt(all.length());
            code += all.charAt(index);
        }
        return code;
    }
}
